package com.cda.mall.controller;


import com.cda.mall.service.ICategoryService;
import com.cda.mall.vo.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 商品分类 前端控制器
 * </p>
 *
 * @author cda
 * @since 2021-11-13
 */
@RestController
@RequestMapping("/category")
@Api(value = "提供商品类别显示的接口",tags = "商品类别管理")
@CrossOrigin
public class CategoryController {

    @Autowired
    private ICategoryService categoryService;

    @GetMapping("/list")
    @ApiOperation("商品分类查询接口")
    public ResultVO listCategory(){
        return categoryService.listCategories();
    }
}

